
#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <BScene>
#include <BLineEdit>
#include <BCheckBox>
#include <BComboBox>
#include <BSpinBox>
#include <BDoubleSpinBox>
#include <BRealSpinBox>
#include <BStackLayout>
#include <BMainWindow>

#include "PixmapHandler.h"
#include "TargetHandler.h"

using namespace BWE;

class MainWindow : public BMainWindow
{
public:
	MainWindow(const BString& title, BWidget* parent = 0);
	~MainWindow();

protected:
	BGeometry* createScreen();
	BLight* createLight();
	BScene* createScene();

	BWidget* createShapeWidget();
	BWidget* createCubeWidget();
	BWidget* createCapsuleWidget();

protected:
	void slotTargetChanged(BObject* object, const BValue& value);
	void slotPositionGroupBoxChecked(BWidget* widget, const BValue& value);
	void slotGroupBoxDoubleClicked(BWidget* widget, const BValue& value);

protected:
	virtual void styleEvent(const BEvent& event);

private:
	BDoubleSpinBox*		_posXSpinBox;
	BDoubleSpinBox*		_posYSpinBox;
	BDoubleSpinBox*		_posZSpinBox;

	//shape layout
	BLineEdit*			_nameEdit;
	BCheckBox*			_visibleCheckBox;
	BComboBox*			_polymodeComboBox;

	BStackLayout*		_stackLayout;
	//cube params
	BRealSpinBox*		_cubeLengthSpinBox;
	BRealSpinBox*		_cubeWidthSpinBox;
	BRealSpinBox*		_cubeHeightSpinBox;

	//capsule params
	BRealSpinBox*		_capsuleRadiusSpinBox;
	BRealSpinBox*		_capsuleHeightSpinBox;
	BSpinBox*			_capsuleSidesSpinBox;
};

#endif
